<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>
        function Book(title,author,year) {
        this.title=title;
        this.author=author;
        this.year=year;
    }
    var book = new Book("JavaScript: The Definitive Guide", "David Flanagan", 2020);
    console.log(book)
    </script>
</body>
</html>